package com.camel.base.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.camel.core.annotations.AssociationField;
import com.camel.core.entity.BasePaginationEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 班次信息
 *
 * @author Administrator
 * @TableName zs_work_shift
 */
@Data
@TableName(value = "zs_work_shift")
public class ZsWorkShift extends BasePaginationEntity implements Serializable {
    /**
     * 班次主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 举办地点
     */
    @TableField(value = "address")
    private String address;

    /**
     * 问卷id
     */
    @TableField(value = "survey_id")
    private Integer surveyId;

    @TableField(exist = false)
    @AssociationField(select = "select name from zs_survey where id = survey_id", name = "survey_name")
    private String surveyName;

    /**
     * 班次日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "shift_date")
    private Date shiftDate;

    /**
     * 开始时间
     */
    @TableField(value = "start_time")
    private String startTime;

    /**
     * 结束时间
     */
    @TableField(value = "end_time")
    private String endTime;

    /**
     * 类型
     */
    @TableField(value = "stype")
    private Integer stype;

    /**
     *
     */
    @TableField(value = "queue_id")
    private Integer queueId;

    /**
     * 公司ID
     */
    @TableField(value = "company_id")
    private Integer companyId;

    /**
     * 状态
     */
    @TableField(value = "state")
    private Integer state;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}